#include "stdafx.h"
#include "CppUnitTest.h"

#include <HSModel/TransformCoords.h>

using namespace Microsoft::VisualStudio::CppUnitTestFramework;

namespace HSModelTests
{
	TEST_CLASS(TransformCoordsTest)
	{
	public:
		
		TEST_METHOD(ShouldTransformWorldCoordsToUI)
		{
		/* ---- Arrange ---- */
    TVector3 initial_vector(1.0, 2.0, 3.0);
    TVector3 expected_vector(1.0, 3.0, 2.0);

    /* ---- Act ----*/
    TVector3 actual_vector = Coords::WorldToUI(initial_vector);

    /* ---- Assert ----*/
    Assert::AreEqual(expected_vector.X(), actual_vector.X());
    Assert::AreEqual(expected_vector.Y(), actual_vector.Y());
    Assert::AreEqual(expected_vector.Z(), actual_vector.Z());
		}

    TEST_METHOD(ShouldTransformUICoordsToWorld)
      {
      /* ---- Arrange ---- */
      TVector3 initial_vector(1.0, 2.0, 3.0);
      TVector3 expected_vector(1.0, 3.0, 2.0);

      /* ---- Act ----*/
      TVector3 actual_vector = Coords::UIToWorld(initial_vector);

      /* ---- Assert ----*/
      Assert::AreEqual(expected_vector.X(), actual_vector.X());
      Assert::AreEqual(expected_vector.Y(), actual_vector.Y());
      Assert::AreEqual(expected_vector.Z(), actual_vector.Z());
      }

	};
}